define(function(require,exports,module){
	'use strict';
	
	var React = require('react');
	var $ = require('jquery');

	module.exports = React.createClass({displayName: "exports",
		handleSubmit:function(e){
			e.preventDefault();
			var username = React.findDOMNode(this.refs.username).value.trim();
			var email = React.findDOMNode(this.refs.email).value.trim();
			console.log({'client_id':client_id,'client_secret':client_secret,'redirect_uri':redirect_uri});
			$('#myModal').modal('hide');
		},
		render:function(){
			return (
				React.createElement("div", {className: "modal fade", id: this.props.id, tabindex: "-1", role: "dialog", "aria-labelledby": "myModalLabel", "aria-hidden": "true"}, 
					React.createElement("div", {className: "modal-dialog"}, 
				    	React.createElement("div", {className: "modal-content"}, 
				      		React.createElement("div", {className: "modal-header"}, 
				        		React.createElement("button", {type: "button", className: "close", "data-dismiss": "modal", "aria-label": "Close"}, React.createElement("span", {"aria-hidden": "true"}, "×")), 
				        		React.createElement("h4", {className: "modal-title", id: "myModalLabel"}, "添加")
				      		), 
					  		React.createElement("form", {onSubmit: this.handleSubmit}, 
				      			React.createElement("div", {className: "modal-body"}, 
						
						  			React.createElement("div", {className: "form-group"}, 
									    React.createElement("label", {for: "username", className: "control-label"}, "用户名:"), 
									    React.createElement("input", {type: "text", className: "form-control", ref: "username", id: "username"})
						  			), 
								  	React.createElement("div", {className: "form-group"}, 
									    React.createElement("label", {for: "email", className: "control-label"}, "邮箱:"), 
									    React.createElement("input", {type: "text", className: "form-control", ref: "email", id: "email"})
								  	), 
								  	React.createElement("div", {className: "form-group"}, 
									    React.createElement("label", {for: "password", className: "control-label"}, "密码:"), 
									    React.createElement("input", {type: "password", className: "form-control", ref: "password", id: "password"})
								  	), 
								  	React.createElement("div", {className: "form-group"}, 
									    React.createElement("label", {for: "rpassword", className: "control-label"}, "确认密码:"), 
									    React.createElement("input", {type: "password", className: "form-control", ref: "rpassword", id: "rpassword"})
								  	)
					
						      	), 
						      	React.createElement("div", {className: "modal-footer"}, 
						        	React.createElement("button", {type: "button", className: "btn btn-default", "data-dismiss": "modal"}, "取消"), 
						        	React.createElement("input", {type: "submit", className: "btn btn-primary", value: "保存"})
						      	)
							)
				    	)
				  	)
				)
			);
		}
	});
	
});